using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class SEOrderClauseMap : EntityTypeConfiguration<SEOrderClause>
    {
        public SEOrderClauseMap()
        {
            // Primary Key
            this.HasKey(t => t.FDetailID);

            // Properties
            this.Property(t => t.FClauseContent)
                .IsRequired()
                .HasMaxLength(1000);

            this.Property(t => t.FClauseTypeName)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("SEOrderClause");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FEntryID).HasColumnName("FEntryID");
            this.Property(t => t.FClauseContent).HasColumnName("FClauseContent");
            this.Property(t => t.FDetailID).HasColumnName("FDetailID");
            this.Property(t => t.FClauseTypeName).HasColumnName("FClauseTypeName");
        }
    }
}
